import request from '../../../utils/request'

//获取配置列表
export const getRightConfigs = function getRightConfigs(data:any) {
    return request({
      url: '/api/Right/GetRightConfigs',
      method: 'get',
      params:data
    })
  }

  //获取单个权限配置
  export const getSingleRightConfig = function getSingleRightConfig(data:any) {
    return request({
      url: '/api/Right/GetSingleRightConfig',
      method: 'get',
      params:data
    })
  }

  //获得权限列表
  export const getRights = function getRights(data:any) {
    return request({
      url: '/api/Right/GetRights',
      method: 'get',
      params:data
    })
  }

  //根据组织ID获取未进行权限配置的职务列表
  export const getNotConfigZhiwuByOrg = function getNotConfigZhiwuByOrg(data:any) {
    return request({
      url: '/api/Organization/GetNotConfigZhiwuByOrg',
      method: 'get',
      params:data
    })
  }

  //获取所有配置中无法选择的组织
  export const getConfigDisabledOrg = function getConfigDisabledOrg(data:any) {
    return request({
      url: '/api/Organization/GetConfigDisabledOrg',
      method: 'get',
      params:data
    })
  }

  //修改权限配置
  export const updateRightConfig = function updateRightConfig(data:any) {
    return request({
      url: '/api/Right/UpdateRightConfig',
      method: 'post',
      data:data
    })
  }

  //新增权限配置
  export const addRightConfig = function addRightConfig(data:any) {
    return request({
      url: '/api/Right/AddRightConfig',
      method: 'post',
      data:data
    })
  }

  //发布权限配置
  export const PublishRightConfig = function PublishRightConfig(data:any) {
    return request({
      url: '/api/Right/PublishRightConfig',
      method: 'post',
      data:data
    })
  }

  //[禁用-启用]权限配置
  export const BanRightConfig = function BanRightConfig(data:any) {
    return request({
      url: '/api/Right/BanRightConfig',
      method: 'post',
      data:data
    })
  }

  //删除权限配置
  export const deleteRightConfigs = function deleteRightConfigs(data:any) {
    return request({
      url: '/api/Right/DeleteRightConfigs',
      method: 'post',
      data:data
    })
  }
